home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 February: Tool Chest / Dev.CD Feb 94.toast / Tool Chest / Development Platforms / MPW Related / MPW Interfaces / PInterfaces / Disks.p < prev    next >
Encoding:
Text File  |  1993-09-17  |  2.0 KB  |  76 lines  |  [TEXT/MPS ]

  1. {
  2.     File:        Disks.p
  3.  
  4.     Copyright:    © 1983-1993 by Apple Computer, Inc.
  5.                 All rights reserved.
  6.  
  7.     Version:    System 7.1 for ETO #11
  8.     Created:    Tuesday, March 30, 1993 18:00
  9.  
  10. }
  11.  
  12. {$IFC UNDEFINED UsingIncludes}
  13. {$SETC UsingIncludes := 0}
  14. {$ENDC}
  15.  
  16. {$IFC NOT UsingIncludes}
  17.     UNIT Disks;
  18.     INTERFACE
  19. {$ENDC}
  20.  
  21. {$IFC UNDEFINED UsingDisks}
  22. {$SETC UsingDisks := 1}
  23.  
  24. {$I+}
  25. {$SETC DisksIncludes := UsingIncludes}
  26. {$SETC UsingIncludes := 1}
  27. {$IFC UNDEFINED UsingTypes}
  28. {$I $$Shell(PInterfaces)Types.p}
  29. {$ENDC}
  30. {$IFC UNDEFINED UsingOSUtils}
  31. {$I $$Shell(PInterfaces)OSUtils.p}
  32. {$ENDC}
  33. {$SETC UsingIncludes := DisksIncludes}
  34.  
  35. TYPE
  36. DriveKind = (sony,hard20);
  37.  
  38.  
  39. DrvSts = RECORD
  40.     track: INTEGER;                 {current track}
  41.     writeProt: SignedByte;          {bit 7 = 1 if volume is locked}
  42.     diskInPlace: SignedByte;        {disk in drive}
  43.     installed: SignedByte;          {drive installed}
  44.     sides: SignedByte;              {-1 for 2-sided, 0 for 1-sided}
  45.     driveQLink: QElemPtr;           {next queue entry}
  46.     driveQVers: INTEGER;            {1 for HD20}
  47.     dQDrive: INTEGER;               {drive number}
  48.     dQRefNum: INTEGER;              {driver reference number}
  49.     dQFSID: INTEGER;                {file system ID}
  50.     CASE DriveKind OF
  51.       sony:
  52.         (twoSideFmt: SignedByte;    {after 1st rd/wrt: 0=1 side, -1=2 side}
  53.         needsFlush: SignedByte;     {-1 for MacPlus drive}
  54.         diskErrs: INTEGER);         {soft error count}
  55.       hard20:
  56.         (driveSize: INTEGER;        {drive block size low word}
  57.         driveS1: INTEGER;           {drive block size high word}
  58.         driveType: INTEGER;         {1 for HD20}
  59.         driveManf: INTEGER;         {1 for Apple Computer, Inc.}
  60.         driveChar: SignedByte;      {230 ($E6) for HD20}
  61.         driveMisc: SignedByte);     {0 -- reserved}
  62.     END;
  63.  
  64.  
  65. FUNCTION DiskEject(drvNum: INTEGER): OSErr;
  66. FUNCTION SetTagBuffer(buffPtr: Ptr): OSErr;
  67. FUNCTION DriveStatus(drvNum: INTEGER;VAR status: DrvSts): OSErr;
  68.  
  69.  
  70. {$ENDC}    { UsingDisks }
  71.  
  72. {$IFC NOT UsingIncludes}
  73.     END.
  74. {$ENDC}
  75.  
  76.